Make disconnect work for toolitems.
authorMatthias Clasen <maclas@gmx.de>
Sat, 6 Sep 2003 22:13:20 +0000 (22:13 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Sat, 6 Sep 2003 22:13:20 +0000 (22:13 +0000)
2003-09-07  Matthias Clasen  <maclas@gmx.de>

* gtk/gtkaction.c (disconnect_proxy): Make disconnect work
for toolitems.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkaction.c

index 03380a5970f793990b6e306194174d4601734461..eb42de9d55d68ff44fba1d654d9c5fc8a992d59e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-09-07  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkaction.c (disconnect_proxy): Make disconnect work
+       for toolitems.
+
 2003-09-06  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkaction.c (gtk_action_connect_proxy): Disconnect from 
index 03380a5970f793990b6e306194174d4601734461..eb42de9d55d68ff44fba1d654d9c5fc8a992d59e 100644 (file)
@@ -1,3 +1,8 @@
+2003-09-07  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkaction.c (disconnect_proxy): Make disconnect work
+       for toolitems.
+
 2003-09-06  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkaction.c (gtk_action_connect_proxy): Disconnect from 
index 03380a5970f793990b6e306194174d4601734461..eb42de9d55d68ff44fba1d654d9c5fc8a992d59e 100644 (file)
@@ -1,3 +1,8 @@
+2003-09-07  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkaction.c (disconnect_proxy): Make disconnect work
+       for toolitems.
+
 2003-09-06  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkaction.c (gtk_action_connect_proxy): Disconnect from 
index 03380a5970f793990b6e306194174d4601734461..eb42de9d55d68ff44fba1d654d9c5fc8a992d59e 100644 (file)
@@ -1,3 +1,8 @@
+2003-09-07  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkaction.c (disconnect_proxy): Make disconnect work
+       for toolitems.
+
 2003-09-06  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkaction.c (gtk_action_connect_proxy): Disconnect from 
index 03380a5970f793990b6e306194174d4601734461..eb42de9d55d68ff44fba1d654d9c5fc8a992d59e 100644 (file)
@@ -1,3 +1,8 @@
+2003-09-07  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkaction.c (disconnect_proxy): Make disconnect work
+       for toolitems.
+
 2003-09-06  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkaction.c (gtk_action_connect_proxy): Disconnect from 
index 926cc1b4ac5372af7362d1f524878e206dac483e..ff5a718036486ad8ea30ee9bd645b4a901fe26d6 100644 (file)
@@ -599,7 +599,7 @@ connect_proxy (GtkAction *action,
       if (action->private_data->accel_quark)
        {
          gtk_menu_item_set_accel_path (GTK_MENU_ITEM (proxy),
-                               g_quark_to_string (action->private_data->accel_quark));
+                                       g_quark_to_string (action->private_data->accel_quark));
        }
 
       g_signal_connect_object (proxy, "activate",
@@ -657,11 +657,6 @@ static void
 disconnect_proxy (GtkAction *action, 
                  GtkWidget *proxy)
 {
-  static guint notify_id = 0;
-
-  if (!notify_id)
-    notify_id = g_signal_lookup ("notify", G_TYPE_OBJECT);
-
   g_object_set_data (G_OBJECT (proxy), "gtk-action", NULL);
 
   /* remove proxy from list of proxies */
@@ -687,13 +682,15 @@ disconnect_proxy (GtkAction *action,
   g_signal_handlers_disconnect_by_func (action,
                                        G_CALLBACK (gtk_action_sync_label),
                                        proxy);
-
-  gtk_menu_item_set_accel_path (GTK_MENU_ITEM (proxy), NULL);
+  
+  if (GTK_IS_MENU_ITEM (widget))
+    gtk_menu_item_set_accel_path (GTK_MENU_ITEM (widget), NULL);
 
   /* toolbar button specific synchronisers ... */
   g_signal_handlers_disconnect_by_func (action,
                                        G_CALLBACK (gtk_action_sync_short_label),
                                        proxy);
+
   g_signal_handlers_disconnect_by_func (proxy,
                                        G_CALLBACK (gtk_action_create_menu_proxy),
                                        action);